﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SDT.Lib.Paging;
using SDT.Model;
using System.Web.UI.WebControls;
using SDT.Systems;
using System.Web.Mvc;

namespace SDT.Admin.ViewModels
{
    /// <summary>
    /// Author: Takamaru Nguyen
    /// Date: 28/06/2011
    /// </summary>
    public class VideoViewModels
    {
        public IPagedList<Video> Videos;
        public TreeNodeCollection Categories = new TreeNodeCollection();
        public int CurrentCat;
        public int? CurrentPubStatus;
        public string Keyword;
        public List<SelectListItem> ListStatusPub
        {
            get
            {
                List<SelectListItem> list = new CommonType().ToList();
                if (this.CurrentPubStatus.HasValue)
                    list.SingleOrDefault(i => int.Parse(i.Value) == this.CurrentPubStatus.Value).Selected = true;

                return list;
            }
        }

        public string ImageRootUrl;
    }

    /// <summary>
    /// Author: Takamaru Nguyen
    /// Date: 28/06/2011
    /// </summary>
    public class VideoInputModels
    {
        public TreeNodeCollection Categories = new TreeNodeCollection();
        public Video Video = new Video();
        public string CatName = string.Empty;
        public string ImageRootUrl;
        public string VideoUrl;
    }
}
